package com.ls.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author lisheng
 * @Date 2025/04/22 11:04
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TreeCategoryNode {

    private Integer id;
    private Integer parentId;
    private String name;
    private Boolean spread = false;

    private List<TreeCategoryNode> children = new ArrayList<>();

    public TreeCategoryNode(Integer id, Integer parentId, String name, Boolean spread) {
        this.id = id;
        this.parentId = parentId;
        this.name = name;
        this.spread = spread;
    }
}
